package com.liuyu.common.framework.validator.annotation;

import com.liuyu.common.framework.validator.impl.ValidOrderCmdValidator;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @ClassName ValidRequest
 * @Author: liuyu
 * @Date: Created in 2021/4/22 11:17
 * @Version: 1
 * @Modified By:
 */
@Inherited
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = ValidOrderCmdValidator.class)
public @interface ValidOrderCmd {
    String message() default "defaultErr";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
